package com.video.netty.send;

import com.qf.entity.ResultData;
import com.video.commons.sendaop.ISocketSend;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * 修改终端名称terminalname
 * web发送
 *  {"id":"terminalRename","userid":"2","terminalname":"2班"}
 *  {"id":"terminalRenameResponse","response":"success"}
 *  {"id":"terminalRenameResponse","response":"fail"}
 */
@Component
public class TerminalRenameSend extends ISocketSend {
    @Override
    public Map<String, Object> sendMsg(Object... objs) {

        Integer userid = (Integer) objs[0];
        String uname = (String) objs[1];
        ResultData<Integer> result = (ResultData<Integer>) objs[2];

        Map map = new HashMap();
        map.put("id", "terminalRename");
        map.put("userid", userid.toString());
        map.put("terminalname", uname);

        return map;
    }
}
